<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
	String path = request.getContextPath(); 
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";   									
%>

<!DOCTYPE HTML>
<html>
  <head>
   <base href="<%=basePath%>">
   <title></title>
	 <meta http-equiv="cache-control" content="no-cache">
	 
     <script src="js/jquery-1.8.0.js"></script>
				<script>
					$(function(){
					   $(".a1").next().hide();
						   
					   $(".a1").click(function(){		
							  	$(this).next().toggle();
					    });
					   
					   $(".a2").click(function(){		
						   		$(".a2").css("background","white");
							  	$(this).css("background","skyblue")
					    });
					     
					  });
					
					
				</script>
				
				<style>
				    html,body{
				    	height:100%;
				    }
				    
				    body{
				    	height:98%;
				    }
				    
				    table{
				    	height:90%;
				    }
					.a1{
						list-style:none;	
						margin:10px;
					}
	
					.a1 a:link,a:visited {
							display: block;
							width: 290px;
							font-weight: bold;
							color: black;
						
							text-align: left;
							padding: 4px;
							text-decoration: none;
							text-transform: uppercase;
						}
						
						.a1 a:hover,a:active {
								background-color: gold;
						}							
				</style>
				
  </head>
  
  <body>
	  				<table>
						<tr>
							<td width="25%">
								<ul>
									<c:forEach var="goods" items="${updateHistoryList }">
										<li  class="a1" ><a href="javascript:void(0)">${goods.id }_${goods.goodsName}_${goods.editDate }</a>
										</li>
										<ul>
											<c:forEach var="history" items="${goods.historyList }">
												<li class="a2">
												 <a target="iframe1"
													href="GoodsServlet.do?flag=showUpdateDetail&updateId=${history.updateId }&id=${history.id}">${history.id }_${history.goodsName}_${history.editDate }</a>
												</li>
											</c:forEach>
										</ul>
									</c:forEach>
								</ul>
							</td>
							<td><iframe name="iframe1" width="100%" height="100%"> </iframe></td>
						</tr>
					</table>			         
									
  </body>
</html>
